import os
import sys
import time
from naoqi import ALProxy

IP = "192.168.1.107"
PORT = 9559


def takePhoto():
    photoCaptureProxy = ALProxy("ALPhotoCapture", IP, PORT)
    photoCaptureProxy.setResolution(2)
    photoCaptureProxy.setPictureFormat("jpg")
    photoCaptureProxy.takePictures(3, "/home/nao/recordings/cameras/", "image")

def main():
    proxy = ALProxy("ALMotion", IP, PORT)
    proxy.wakeUp()
    time.sleep(1)
    takePhoto()

if __name__ == '__main__':
    main()